package StudyCode.summary.Basic.mystring;

import java.util.Arrays;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class StringSplit {
	public static void main(String[] args) {
		String str = "Hello World,How are you?";
		System.out.println("Split 一参数方法:");
		String[] result = str.split("o");
		System.out.println(Arrays.toString(result));
		System.out.println("Split 两参数方法:");
		String[] result1 = str.split("o", 1);
		System.out.println(Arrays.toString(result1));
		String[] result2 = str.split("o", 2);
		System.out.println(Arrays.toString(result2));
	}
}
